/* @(#)GSOrderSubmitVO.java    
 *
 * Project: GS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Jenny Li     2006-2-15    新增
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;

/**
 * 
 */
public class GSOrderStatusTraceQueryVO implements GSBaseBean {
    
    public String orderid;
    public String manufactureId;    //产品编码
    public String manufactureName;  //产品名称
    public String manufSpec;
    public String manufType;
    public String manufBrand;
    public double orderCount;
    public String quantUnit;
    public String orderDetailStatus;
    public String orderCreateDate;  //创建时间
    public String orderDeptId;      //订货单位
    public String deliverMode; //配送方式
    public String banlanceMode; //结算方式
    public String deliverGoodsAddr; //送货地址
    
    public String deliverGoodsDate; //送货时间

    public String conCentricityId; //集中编码
    public String orderDetailId;    //订单明细编码
    public String orderDeptName;
    public double goodsUnitprice;   //订货单价
    
    public String mode;//压库、买断
    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseBean#process(java.sql.ResultSet)
     */
    public Object process(ResultSet aResultSet) throws SQLException {
        GSOrderStatusTraceQueryVO tGSOrderVO = new GSOrderStatusTraceQueryVO();
        tGSOrderVO.orderDetailId = aResultSet.getString("P1").trim();
        tGSOrderVO.orderDetailStatus = aResultSet.getString("P2").trim();
        tGSOrderVO.manufactureName = aResultSet.getString("P3").trim();
        tGSOrderVO.manufSpec = aResultSet.getString("P4") == null? "":aResultSet.getString("P4").trim();
        tGSOrderVO.manufType = aResultSet.getString("P5") == null? "":aResultSet.getString("P5").trim();
        tGSOrderVO.manufBrand = aResultSet.getString("P6") == null? "":aResultSet.getString("P6").trim(); 
        tGSOrderVO.orderCount = aResultSet.getDouble("P7");
        tGSOrderVO.orderCreateDate = aResultSet.getString("P8");
        tGSOrderVO.orderDeptId = aResultSet.getString("P9");
        tGSOrderVO.orderDeptName = aResultSet.getString("P10") == null?"":aResultSet.getString("P10");
        tGSOrderVO.deliverMode = aResultSet.getString("P11") == null?"":aResultSet.getString("P11");
        tGSOrderVO.banlanceMode = aResultSet.getString("P12")== null?"":aResultSet.getString("P12");
        tGSOrderVO.quantUnit = aResultSet.getString("P13")== null?"":aResultSet.getString("P13");
        tGSOrderVO.conCentricityId = aResultSet.getString("P14");
        tGSOrderVO.orderid = aResultSet.getString("P15");
        tGSOrderVO.goodsUnitprice = aResultSet.getDouble("P16");
        tGSOrderVO.manufactureId = aResultSet.getString("P17");
        
        String deliverGoodsDateStr = "";
        if (aResultSet.getString("P18") != null)
        {
        	deliverGoodsDateStr = aResultSet.getString("P18");
        }
        
        if (aResultSet.getString("P19") != null && !deliverGoodsDateStr.equals(""))
        {
        	if (aResultSet.getString("P19").equals("1")) deliverGoodsDateStr += " 8:00-12:00";
			if (aResultSet.getString("P19").equals("2")) deliverGoodsDateStr += " 13:00-18:00";
			if (aResultSet.getString("P19").equals("3")) deliverGoodsDateStr += " 全天";
        }
        
        tGSOrderVO.deliverGoodsDate = deliverGoodsDateStr;
        tGSOrderVO.mode=aResultSet.getString("P20")== null?"":aResultSet.getString("P20");
        return tGSOrderVO;
    }

}
